package com.xinz;

public class Config {

	public static Config DEFAULT = new Config("spot-config.txt");

	/**默认的服务器IP*/

	static final String DEFAULT_IP = "192.168.1.222";
	
	/**默认的端口号*/

	static final int DEFAULT_PORT = 9001;
	
	static final int DEFAULT_HEARTBIT = 1000;
	
	public static String version = "1.1"; 
	
	/**服务器ip*/
	String ip = DEFAULT_IP;
	
	/**服务端口*/
	int port = DEFAULT_PORT;
	
	/**
	 * 在游戏过程中是否要显示帧
	 */
	boolean showFPS = true;
	
	/**是否显示调试信息*/
	boolean showDebug = true;
	
	/**测试名字*/
	String testId = "xxx";
	
	/**测试密码*/
	String testName = "xxxx";
	
	int heartbit = DEFAULT_HEARTBIT;

	/**
	 * 客户端模拟接口配置表
	 */
	static{
		//玩家接口的模拟配置
//		Connector.setSimuImpl(PlayerInterface.class,new PlayerSimu());
//		Connector.setSimuImpl(FightInterface.class, new FightInterfaceImpl()); 
	}
	
	public Config(String path) {
		/*
		try {
			loadFromSDCard(path);
		} catch (Exception e) {
			e.printStackTrace();
		}
		*/
	}
	
	public String getIp() {
		return ip;
	}

	public int getPort() {
		return port;
	}

	public boolean isShowFPS() {
		return showFPS;
	}

	public boolean isShowDebug() {
		return showDebug;
	}

	public String getTestId() {
		return testId;
	}

	public String getTestName() {
		return testName;
	}
}
